As a transport layer protocol in the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite, the User Datagram Protocol (UDP) is mainly adopted for network applications to transmit data between computers.
Different from TCP, UDP is a connectionless protocol, which is responsible only for data encapsulation and transmission and does not provide any retransmission mechanism. Because UDP introduces less delay and is faster, it is often used to transmit delay-sensitive media streams such as voice and video.
Because of the absence of a retransmission mechanism, UDP, however, can hardly handle problems such as packet loss and packet reordering, which are typical of an IP-based network. FIG. 1 is a schematic diagram illustrating these transmission problems. As shown in FIG. 1, the transmitter transmits nine sequential packets to the receiver. If the receiver fails to receive packet 5, packet loss occurs; if the receiver receives packet 2 after receiving packet 9, reordering occurs; if the receiver receives packet 2 after a long time, for example, after receiving packet 200, large-scale reordering occurs. When the packet loss occurs, the receiver cannot recover the lost packet because UDP does not provide a retransmission mechanism. When reordering occurs, the UDP receiver will wait for out-of-order packets for a period and reorder the out-of-order packets at the application layer after receiving them. When large-scale reordering occurs, the receiver may fail to receive an out-of-order packet when the timer expires. In this case, UDP regards the out-of-order packet as a lost packet, and thus the packet cannot be restored. As the existing UDP packet processing method cannot deal with reordering and packet loss, the reliability of UDP is low and problems such as jerky, unclear speech, and distorted, blurry, grainy images are common with the media streams transmitted in UDP.